#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTcpSocket>
#include <QUdpSocket>
#include <QDebug>
#include <QPixmap>
#include <QJsonDocument>
#include <QJsonObject>
#include <QByteArray>
#include <QIcon>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();


private slots:
    void tcpread();
    void udpread();



    void on_upbutton_clicked();

    void on_downbutton_clicked();

    void on_leftbutton_clicked();

    void on_rightpshbutton_clicked();

private:
    Ui::Widget *ui;
    QTcpSocket* tsocket;
    QUdpSocket* usocket;
    quint32 port;
};
#endif // WIDGET_H
